package cn.alibab.cangku.dao;


import cn.alibab.cangku.vo.AddressVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AddressDao {
    @Select("SELECT DISTINCT NAME,address ,newtable1.create_time,pName FROM\n" +
            "(SELECT  NAME,address ,newtable.create_time,newtable.out_num,p_num FROM \n" +
            "(SELECT   NAME,address ,biz_consumer.create_time,out_num FROM `biz_consumer`\n" +
            " INNER JOIN `biz_out_stock` WHERE biz_consumer.`id` =biz_out_stock.`consumer_id` \n" +
            ") AS newtable INNER JOIN `biz_out_stock_info` AS bosi WHERE  newtable.out_num=bosi.out_num) AS newtable1 \n" +
            "INNER JOIN `biz_product` WHERE newtable1.p_num=biz_product.`p_num`")
    List<AddressVo> finaAllAddress();
}
